<!DOCTYPE html>
<html>
<head>
    

    

    



    <meta charset="utf-8">
    
    
    
    <title>ActiveMQ_zookeeper高可用配置 | Cucy的博客</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="activemq">
    <meta name="description" content="ActiveMQ levelDBzookeeper主机:


主机名
ip
客户端端口
zookeeper集群端口
选leader端口




node1
10.76.249.173
2181
2881
3881


node2
10.76.249.174
2181
2881
3881


node3
10.76.249.175
2181
2881
3881">
<meta property="og:type" content="article">
<meta property="og:title" content="ActiveMQ_zookeeper高可用配置">
<meta property="og:url" content="http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/index.html">
<meta property="og:site_name" content="Cucy的博客">
<meta property="og:description" content="ActiveMQ levelDBzookeeper主机:


主机名
ip
客户端端口
zookeeper集群端口
选leader端口




node1
10.76.249.173
2181
2881
3881


node2
10.76.249.174
2181
2881
3881


node3
10.76.249.175
2181
2881
3881">
<meta property="og:updated_time" content="2019-02-22T05:28:07.821Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="ActiveMQ_zookeeper高可用配置">
<meta name="twitter:description" content="ActiveMQ levelDBzookeeper主机:


主机名
ip
客户端端口
zookeeper集群端口
选leader端口




node1
10.76.249.173
2181
2881
3881


node2
10.76.249.174
2181
2881
3881


node3
10.76.249.175
2181
2881
3881">
    
        <link rel="alternate" type="application/atom+xml" title="Cucy的博客" href="/atom.xml">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="/css/style.css?v=1.6.13">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.png">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">cucy</h5>
          <a href="mailto:292016176@qq.com" title="292016176@qq.com" class="mail">292016176@qq.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                Archives
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                Tags
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/cucy" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">ActiveMQ_zookeeper高可用配置</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">ActiveMQ_zookeeper高可用配置</h1>
        <h5 class="subtitle">
            
                <time datetime="2017-04-14T08:33:28.000Z" itemprop="datePublished" class="page-time">
  2017-04-14
</time>


            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-1"><a class="post-toc-link" href="#ActiveMQ-levelDB"><span class="post-toc-number">1.</span> <span class="post-toc-text">ActiveMQ levelDB</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#zookeeper"><span class="post-toc-number">1.1.</span> <span class="post-toc-text">zookeeper</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#主机"><span class="post-toc-number">1.1.1.</span> <span class="post-toc-text">主机:</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#软件"><span class="post-toc-number">1.1.2.</span> <span class="post-toc-text">软件:</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#目录"><span class="post-toc-number">1.1.3.</span> <span class="post-toc-text">目录:</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#数据、日志"><span class="post-toc-number">1.1.4.</span> <span class="post-toc-text">数据、日志</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#配置文件"><span class="post-toc-number">1.1.5.</span> <span class="post-toc-text">配置文件</span></a></li></ol></li><li class="post-toc-item post-toc-level-2"><a class="post-toc-link" href="#activemq"><span class="post-toc-number">1.2.</span> <span class="post-toc-text">activemq</span></a></li></ol></li></ol>
        </nav>
    </aside>
    
<article id="post-36-ActiveMQ-zookeeper高可用配置"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">ActiveMQ_zookeeper高可用配置</h1>
        <div class="post-meta">
            <time class="post-time" title="2017-04-14 16:33:28" datetime="2017-04-14T08:33:28.000Z"  itemprop="datePublished">2017-04-14</time>

            


            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h1 id="ActiveMQ-levelDB"><a href="#ActiveMQ-levelDB" class="headerlink" title="ActiveMQ levelDB"></a>ActiveMQ levelDB</h1><h2 id="zookeeper"><a href="#zookeeper" class="headerlink" title="zookeeper"></a>zookeeper</h2><h3 id="主机"><a href="#主机" class="headerlink" title="主机:"></a>主机:</h3><table>
<thead>
<tr>
<th>主机名</th>
<th>ip</th>
<th>客户端端口</th>
<th>zookeeper集群端口</th>
<th>选leader端口</th>
</tr>
</thead>
<tbody>
<tr>
<td>node1</td>
<td>10.76.249.173</td>
<td>2181</td>
<td>2881</td>
<td>3881</td>
</tr>
<tr>
<td>node2</td>
<td>10.76.249.174</td>
<td>2181</td>
<td>2881</td>
<td>3881</td>
</tr>
<tr>
<td>node3</td>
<td>10.76.249.175</td>
<td>2181</td>
<td>2881</td>
<td>3881</td>
</tr>
</tbody>
</table>
<a id="more"></a>
<h3 id="软件"><a href="#软件" class="headerlink" title="软件:"></a>软件:</h3><p>zookeeper-3.4.10.tar.gz</p>
<p>apache-activemq-5.9.1-bin.tar.gz</p>
<h3 id="目录"><a href="#目录" class="headerlink" title="目录:"></a>目录:</h3><p>解压软链接</p>
<p>ln -sv zookeeper-3.4.10 /opt/module/node1_zookeeper</p>
<p>ln -sv zookeeper-3.4.10 /opt/module/node2_zookeeper</p>
<p>ln -sv zookeeper-3.4.10 /opt/module/node3_zookeeper</p>
<h3 id="数据、日志"><a href="#数据、日志" class="headerlink" title="数据、日志"></a>数据、日志</h3><p>mkdir -pv /home/datadir/{data,log}</p>
<h3 id="配置文件"><a href="#配置文件" class="headerlink" title="配置文件"></a>配置文件</h3><p>cp zoo_sample.cfg zoo.cfg</p>
<p>cat zoo.cfg</p>
<p>tickTime=2000<br>initLimit=10<br>syncLimit=5<br>dataDir=/home/datadir/data<br>dataLogDir=/home/datadir/log<br>clientPort=2181<br>server.1=node1:2881:3881<br>server.2=node2:2881:3881<br>server.3=node3:2881:3881</p>
<p>echo  1 &gt;/home/datadir/data/myid<br>echo  2 &gt;/home/datadir/data/myid<br>echo  3 &gt;/home/datadir/data/myid</p>
<p>/opt/module/zookeeper-3.4.10/bin/zkServer.sh start</p>
<p><strong>端口作用:</strong></p>
<p>2181 :  客户端连接</p>
<p>2881: zookeeper集群消息通信端口</p>
<p>3881:选leader专用端口</p>
<h2 id="activemq"><a href="#activemq" class="headerlink" title="activemq"></a>activemq</h2><table>
<thead>
<tr>
<th>主机</th>
<th>集群端口</th>
<th>stomp 端口</th>
<th>管理端口</th>
</tr>
</thead>
<tbody>
<tr>
<td>10.76.249.173</td>
<td>62621</td>
<td>61613</td>
<td>8161</td>
</tr>
<tr>
<td>10.76.249.174</td>
<td>62621</td>
<td>61613</td>
<td>8161</td>
</tr>
<tr>
<td>10.76.249.175</td>
<td>62621</td>
<td>61613</td>
<td>8161</td>
</tr>
</tbody>
</table>
<p>配置文件：</p>
<figure class="highlight xml"><table><tr><td class="code"><pre><span class="line"><span class="comment">&lt;!-- START SNIPPET: example --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">beans</span></span><br><span class="line">  <span class="attr">xmlns</span>=<span class="string">"http://www.springframework.org/schema/beans"</span></span><br><span class="line">  <span class="attr">xmlns:xsi</span>=<span class="string">"http://www.w3.org/2001/XMLSchema-instance"</span></span><br><span class="line">  <span class="attr">xsi:schemaLocation</span>=<span class="string">"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd</span><br><span class="line">  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd"</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">&lt;!-- Allows us to use system properties as variables in this configuration file --&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">bean</span> <span class="attr">class</span>=<span class="string">"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">property</span> <span class="attr">name</span>=<span class="string">"locations"</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">value</span>&gt;</span>file:$&#123;activemq.conf&#125;/credentials.properties<span class="tag">&lt;/<span class="name">value</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">property</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">bean</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">&lt;!--</span><br><span class="line">                 The &lt;broker&gt; element is used to configure the ActiveMQ broker.</span><br><span class="line">    --&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">broker</span> <span class="attr">xmlns</span>=<span class="string">"http://activemq.apache.org/schema/core"</span> <span class="attr">brokerName</span>=<span class="string">"ShMQTest"</span> <span class="attr">dataDirectory</span>=<span class="string">"$&#123;activemq.data&#125;"</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="tag">&lt;<span class="name">destinationPolicy</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">policyMap</span>&gt;</span></span><br><span class="line">              <span class="tag">&lt;<span class="name">policyEntries</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">policyEntry</span> <span class="attr">topic</span>=<span class="string">"&gt;"</span> &gt;</span></span><br><span class="line">                    <span class="comment">&lt;!-- The constantPendingMessageLimitStrategy is used to prevent</span><br><span class="line">                                                  slow topic consumers to block producers and affect other consumers</span><br><span class="line">                         by limiting the number of messages that are retained</span><br><span class="line">                         For more information, see:</span><br><span class="line"></span><br><span class="line">                         http://activemq.apache.org/slow-consumer-handling.html</span><br><span class="line"></span><br><span class="line">                    --&gt;</span></span><br><span class="line">                  <span class="tag">&lt;<span class="name">pendingMessageLimitStrategy</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">constantPendingMessageLimitStrategy</span> <span class="attr">limit</span>=<span class="string">"1000"</span>/&gt;</span></span><br><span class="line">                  <span class="tag">&lt;/<span class="name">pendingMessageLimitStrategy</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;/<span class="name">policyEntry</span>&gt;</span></span><br><span class="line">              <span class="tag">&lt;/<span class="name">policyEntries</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">policyMap</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">destinationPolicy</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!--</span><br><span class="line">                         The managementContext is used to configure how ActiveMQ is exposed in</span><br><span class="line">            JMX. By default, ActiveMQ uses the MBean server that is started by</span><br><span class="line">            the JVM. For more information, see:</span><br><span class="line"></span><br><span class="line">            http://activemq.apache.org/jmx.html</span><br><span class="line">        --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">managementContext</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">managementContext</span> <span class="attr">createConnector</span>=<span class="string">"false"</span>/&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">managementContext</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!--</span><br><span class="line">                         Configure message persistence for the broker. The default persistence</span><br><span class="line">            mechanism is the KahaDB store (identified by the kahaDB tag).</span><br><span class="line">            For more information, see:</span><br><span class="line"></span><br><span class="line">            http://activemq.apache.org/persistence.html</span><br><span class="line">        --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">persistenceAdapter</span>&gt;</span></span><br><span class="line">              <span class="comment">&lt;!-- 注释持久化默认适配器 Start  --&gt;</span></span><br><span class="line">            <span class="comment">&lt;!-- Start</span><br><span class="line">                             &lt;kahaDB directory="$&#123;activemq.data&#125;/kahadb"/&gt;</span><br><span class="line">           End --&gt;</span></span><br><span class="line">            <span class="comment">&lt;!-- 注释持久化默认适配器 End --&gt;</span></span><br><span class="line"></span><br><span class="line">            <span class="comment">&lt;!-- 自定义高可用集群服务 Start --&gt;</span></span><br><span class="line">            <span class="comment">&lt;!--  hostname需要改成不同的节点 Start --&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">replicatedLevelDB</span></span><br><span class="line">                    <span class="attr">directory</span>=<span class="string">"$&#123;activemq.data&#125;/leveldb"</span></span><br><span class="line">                    <span class="attr">replicas</span>=<span class="string">"3"</span></span><br><span class="line">                    <span class="attr">bind</span>=<span class="string">"tcp://0.0.0.0:62621"</span></span><br><span class="line">                    <span class="attr">zkAddress</span>=<span class="string">"10.76.249.173:2181,10.76.249.174:2181,10.76.249.175:2181"</span></span><br><span class="line">                    <span class="attr">zkPassword</span>=<span class="string">""</span></span><br><span class="line">                    <span class="attr">weight</span>=<span class="string">"1"</span></span><br><span class="line">                    <span class="attr">hostname</span>=<span class="string">"node1"</span></span><br><span class="line">                    <span class="attr">zkPath</span>=<span class="string">"/activemq/leveldb-stores"</span></span><br><span class="line">                    <span class="attr">securityToken</span>=<span class="string">""</span></span><br><span class="line">            /&gt;</span></span><br><span class="line">            <span class="comment">&lt;!-- 自定义集群服务 End--&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">persistenceAdapter</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">          <span class="comment">&lt;!--</span><br><span class="line">                           The systemUsage controls the maximum amount of space the broker will</span><br><span class="line">            use before disabling caching and/or slowing down producers. For more information, see:</span><br><span class="line">            http://activemq.apache.org/producer-flow-control.html</span><br><span class="line">          --&gt;</span></span><br><span class="line">          <span class="tag">&lt;<span class="name">systemUsage</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">systemUsage</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">memoryUsage</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">memoryUsage</span> <span class="attr">percentOfJvmHeap</span>=<span class="string">"70"</span> /&gt;</span></span><br><span class="line">                <span class="tag">&lt;/<span class="name">memoryUsage</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">storeUsage</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">storeUsage</span> <span class="attr">limit</span>=<span class="string">"10 gb"</span>/&gt;</span></span><br><span class="line">                <span class="tag">&lt;/<span class="name">storeUsage</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">tempUsage</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">tempUsage</span> <span class="attr">limit</span>=<span class="string">"5 gb"</span>/&gt;</span></span><br><span class="line">                <span class="tag">&lt;/<span class="name">tempUsage</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">systemUsage</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">systemUsage</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!--</span><br><span class="line">                         The transport connectors expose ActiveMQ over a given protocol to</span><br><span class="line">            clients and other brokers. For more information, see:</span><br><span class="line"></span><br><span class="line">            http://activemq.apache.org/configuring-transports.html</span><br><span class="line">        --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">transportConnectors</span>&gt;</span></span><br><span class="line">            <span class="comment">&lt;!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB --&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">transportConnector</span> <span class="attr">name</span>=<span class="string">"openwire"</span> <span class="attr">uri</span>=<span class="string">"tcp://0.0.0.0:61616?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"</span>/&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">transportConnector</span> <span class="attr">name</span>=<span class="string">"amqp"</span> <span class="attr">uri</span>=<span class="string">"amqp://0.0.0.0:5672?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"</span>/&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">transportConnector</span> <span class="attr">name</span>=<span class="string">"stomp"</span> <span class="attr">uri</span>=<span class="string">"stomp://0.0.0.0:61613?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"</span>/&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">transportConnector</span> <span class="attr">name</span>=<span class="string">"mqtt"</span> <span class="attr">uri</span>=<span class="string">"mqtt://0.0.0.0:1883?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"</span>/&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">transportConnector</span> <span class="attr">name</span>=<span class="string">"ws"</span> <span class="attr">uri</span>=<span class="string">"ws://0.0.0.0:61614?maximumConnections=1000&amp;amp;wireFormat.maxFrameSize=104857600"</span>/&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">transportConnectors</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!-- destroy the spring context on shutdown to stop jetty --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">shutdownHooks</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">bean</span> <span class="attr">xmlns</span>=<span class="string">"http://www.springframework.org/schema/beans"</span> <span class="attr">class</span>=<span class="string">"org.apache.activemq.hooks.SpringContextHook"</span> /&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">shutdownHooks</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;/<span class="name">broker</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="comment">&lt;!--</span><br><span class="line">                 Enable web consoles, REST and Ajax APIs and demos</span><br><span class="line">        The web consoles requires by default login, you can disable this in the jetty.xml file</span><br><span class="line"></span><br><span class="line">        Take a look at $&#123;ACTIVEMQ_HOME&#125;/conf/jetty.xml for more details</span><br><span class="line">    --&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">import</span> <span class="attr">resource</span>=<span class="string">"jetty.xml"</span>/&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">beans</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- END SNIPPET: example --&gt;</span></span><br></pre></td></tr></table></figure>

        </div>

        <blockquote class="post-copyright">
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2019-02-22T05:28:07.821Z" itemprop="dateUpdated">2019-02-22 13:28:07</time>
</span><br>


        
        <a href="/2017/04/14/36-ActiveMQ-zookeeper高可用配置/" target="_blank" rel="external">http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/</a>
        
    </div>
    <footer>
        <a href="http://zhourudong.cn">
            <img src="/img/avatar.png" alt="cucy">
            cucy
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/activemq/">activemq</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/&title=《ActiveMQ_zookeeper高可用配置》 — Cucy的博客&pic=http://zhourudong.cn/img/avatar.png" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/&title=《ActiveMQ_zookeeper高可用配置》 — Cucy的博客&source=ActiveMQ levelDBzookeeper主机:


主机名
ip
客户端端口
zookeeper集群端口
选leader端口




node1..." data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《ActiveMQ_zookeeper高可用配置》 — Cucy的博客&url=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/&via=http://zhourudong.cn" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2017/04/20/37-python-字典/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">python 字典</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2017/03/30/35-linux-vsftpd/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">linux vsftpd</h4>
      </a>
    </div>
  
</nav>



    














</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        谢谢大爷~
        <i class="icon icon-quote-right"></i>
    </h3>
    <div class="reward-content">
        
        <div class="reward-code">
            <img id="rewardCode" src="/img/wechat.jpg" alt="打赏二维码">
        </div>
        
        <label class="reward-toggle">
            <input id="rewardToggle" type="checkbox" class="reward-toggle-check"
                data-wechat="/img/wechat.jpg" data-alipay="/img/alipay.jpg">
            <div class="reward-toggle-ctrol">
                <span class="reward-toggle-item wechat">微信</span>
                <span class="reward-toggle-label"></span>
                <span class="reward-toggle-item alipay">支付宝</span>
            </div>
        </label>
        
    </div>
</div>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循 <a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>cucy &copy; 2016 - 2021</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/&title=《ActiveMQ_zookeeper高可用配置》 — Cucy的博客&pic=http://zhourudong.cn/img/avatar.png" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/&title=《ActiveMQ_zookeeper高可用配置》 — Cucy的博客&source=ActiveMQ levelDBzookeeper主机:


主机名
ip
客户端端口
zookeeper集群端口
选leader端口




node1..." data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《ActiveMQ_zookeeper高可用配置》 — Cucy的博客&url=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/&via=http://zhourudong.cn" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://zhourudong.cn/2017/04/14/36-ActiveMQ-zookeeper高可用配置/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };


</script>

<script src="/js/main.min.js?v=1.6.13"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="/js/search.min.js?v=1.6.13" async></script>






<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>



<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '死鬼去哪里了！';
            clearTimeout(titleTime);
        } else {
            document.title = '(つェ⊂)咦!又好了!';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
